package de.tudarmstadt.ukp.wikisniffer.userstudy.gui.questions;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.LayoutManager;
import java.awt.Panel;
import java.awt.Rectangle;
import java.awt.TextArea;
import java.awt.TextField;

import de.tudarmstadt.ukp.wikisniffer.userstudy.gui.AbstractInfoGui;
import de.tudarmstadt.ukp.wikisniffer.userstudy.gui.AbstractQuestionGui;
import de.tudarmstadt.ukp.wikisniffer.userstudy.util.Answer;
import de.tudarmstadt.ukp.wikisniffer.userstudy.util.Question;

@SuppressWarnings("serial")
public class VpCodeQuestion extends AbstractQuestionGui {

	private TextField tfVpCode;
	
	public void init(String text){
		this.textFieldContent = text;
	}

	@Override
	public Answer getAnswer() {
		Answer answer = new Answer();
		answer.setAnswer(tfVpCode.getText(),null);
		return answer;
	}

	@Override
	public void init(Question question) {
		textFieldContent = "Bitte geben Sie den VP-Code ein:";
	}

	@Override
	protected void startCounter() {
		// do nothing
	}

	@Override
	protected Panel getContentPanel() {
		Panel content=new Panel();
		
		content.setLayout(new GridLayout(1,1));
		
		tfVpCode = new TextField();
		tfVpCode.setEditable(true);
		tfVpCode.setSize(1000, 200);
		content.add(tfVpCode);
		
		return content;
	}

}
